using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data;
using System.Net.Mail;
using System.Web.Security;
using System.IO;
using System.Data.SqlClient;

/// <summary>
/// Summary description for AddPriceBAL
/// </summary>
public class AddPriceBAL
{
	public AddPriceBAL()
	{
		//
		// TODO: Add constructor logic here
		//
	}
    
    public bool AddPrice(int FlightID,int BussinessClassPrice,int FisrtClassPrice,int ClubPrice,int ChildDiscount,int SeniorDiscount)
    {
        SqlConnection con = new SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings["sqlString"].ConnectionString);
        con.Open();
        String sqlCommand = "INSERT INTO Airline_Price VALUES(" + FlightID.ToString() + "," + BussinessClassPrice.ToString() + "," + FisrtClassPrice.ToString() + "," + ClubPrice.ToString() + "," + ChildDiscount.ToString() + "," + SeniorDiscount.ToString() + ")";
        bool flag = false;
        try
        {
            SqlCommand com = new SqlCommand(sqlCommand, con);
            int rows = com.ExecuteNonQuery();
            if (rows > 0)
            {
                flag = true;
            }
        }
        catch (Exception e)
        {
            string x = e.Message;
        }
        finally
        {
            con.Close();
        }
        return flag;
    }
}
